{extend name="admin/public/layout" /}
{block name="content"}
<template id="app">
    <div>
        {:widget('before_content')}
        
        
        <div class="form-tab">
            <a-tabs v-if="Object.keys(tabs).length > 1" type="card" v-model="activeTab">
                <a-tab-pane v-for="(item,key) in tabs" :key="key" :tab="item"></a-tab-pane>
            </a-tabs>
        </div>
        <a-form-model class="form" ref="ruleForm" :model="form" :rules="rules" :label-col="{span: 3}"
            :wrapper-col="{span: 18}">
            {:widget('before_form_item')}
            
            
            <div v-show="activeTab == 'base'">
                <a-form-model-item prop='type' label='类型'>
                    <a-radio-group v-model='form.type'>

                    </a-radio-group>
                </a-form-model-item>
                <a-form-model-item prop='pid' label='父ID'>
                    <yi-select mode='default' v-model='form.pid' url='/system/admin/auth_rule/tree_list'
                        label-field='title' value-field='id' :paginate='false'></yi-select>
                </a-form-model-item>
                <a-form-model-item prop='name' label='规则名称'>
                    <a-input placeholder='请输入规则名称' v-model='form.name'></a-input>
                </a-form-model-item>
                <a-form-model-item prop='title' label='规则名称'>
                    <a-input placeholder='请输入规则名称' v-model='form.title'></a-input>
                </a-form-model-item>
                <a-form-model-item prop='icon' label='图标'>
                    <a-input placeholder='请输入图标' v-model='form.icon'></a-input>
                </a-form-model-item>
                <a-form-model-item prop='condition' label='条件'>
                    <a-input placeholder='请输入条件' v-model='form.condition'></a-input>
                </a-form-model-item>
                <a-form-model-item prop='remark' label='备注'>
                    <a-input placeholder='请输入备注' v-model='form.remark'></a-input>
                </a-form-model-item>
                <a-form-model-item prop='ismenu' label='是否为菜单'>
                    <a-radio-group v-model='form.ismenu'>
                        <a-radio value='0'>否</a-radio>
                        <a-radio value='1'>是</a-radio>
                    </a-radio-group>
                </a-form-model-item>
                <a-form-model-item prop='weigh' label='权重'>
                    <a-input-number v-model='form.weigh' step='1'></a-input-number>
                </a-form-model-item>
                <a-form-model-item prop='app' label='应用'>
                    <a-input placeholder='请输入应用' v-model='form.app'></a-input>
                </a-form-model-item>
                <a-form-model-item prop='app_type' label='应用类型'>
                    <a-input placeholder='请输入应用类型' v-model='form.app_type'></a-input>
                </a-form-model-item>
                <a-form-model-item prop='status' label='状态'>
                    <a-switch v-model='form.status' />
                </a-form-model-item>
            </div>

            {:widget('after_form_item')}
            
            
            <a-form-item class="fixed-bottom-btn-group" :wrapper-col="{ span: 14, offset: 4 }">
                <a-button class="btn" :loading="btnLoading" type="primary" @click="onSubmit">提交</a-button>
                <a-button class="btn" @click="onCancel">取消</a-button>
            </a-form-item>
        </a-form-model>
        {:widget('after_content')}
        
        
    </div>
</template>
{/block}
{block name="style"}
{:widget('style')}


{/block}
{block name="scripts"}
{:widget('scripts')}


{/block}